package com.icss.id.dao;

import com.icss.id.pojo.Record;
import com.icss.id.pojo.User;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.data.jpa.repository.Modifying;
import org.springframework.data.jpa.repository.Query;
import org.springframework.test.annotation.Rollback;

import javax.transaction.Transactional;


public interface IRecordDao extends JpaRepository<Record,Integer>, JpaSpecificationExecutor<Record> {



    @Transactional
    @Modifying
//    @Rollback(false)
    @Query("update Record set status=?1 ,user=?2 where recordId =?3")
    void updateStatus(Boolean status, User user, Integer recordId);
}
